/**
 * Copyright
 */
package org.sevaapp.domain;

import javax.persistence.CascadeType;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.MappedSuperclass;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.context.SecurityContextHolder;

import org.sevaapp.dao.ApplicantDao;
import org.sevaapp.dao.DaoException;

/**
 *  THIS IS A CODE GENERATED FILE. DO NOT EDIT.
 */

@MappedSuperclass
public abstract class BaseApplicant extends BaseDomainObject {

	private static final Log log = LogFactory.getLog(BaseApplicant.class);

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Integer id;

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getId() {
		return id;
	}
	
	private String firstName;

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getFirstName() {
		return firstName;
	}

	private String middleName;

	public void setMiddleName(String middleName) {
		this.middleName = middleName;
	}

	public String getMiddleName() {
		return middleName;
	}

	private String lastName;

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getLastName() {
		return lastName;
	}

	private String homePhone;

	public void setHomePhone(String homePhone) {
		this.homePhone = homePhone;
	}

	public String getHomePhone() {
		return homePhone;
	}

	private String email;

	public void setEmail(String email) {
		this.email = email;
	}

	public String getEmail() {
		return email;
	}

//	@OneToOne(fetch = FetchType.EAGER, cascade = {CascadeType.PERSIST, CascadeType.REMOVE})
//	@JoinColumn(name = "APPLICANT_ID", nullable = false)
//	private Address applicantAddress;
//
//	public void setApplicantAddress(Address applicantAddress) {
//		this.applicantAddress = applicantAddress;
//	}
//
//	public Address getApplicantAddress() {
//		return applicantAddress;
//	}

	@Autowired
	@Transient
	private ApplicantDao dao;

	// CRUD Methods
	public void add(Applicant applicantData) {
		log.debug("add(domainData) method called.");
		try {
			dao.add(applicantData);
		} catch (DaoException ex) {
			ex.printStackTrace();
		}
	}

	public void add() {
		log.debug("add() method called.");
		try {
			dao.add((Applicant) this);
		} catch (DaoException ex) {
			ex.printStackTrace();
		}
	}

	public void delete(Integer id) {
		log.debug("delete() method called.");
		try {
			dao.delete(id);
		} catch (DaoException ex) {
			ex.printStackTrace();
		}
	}

	public void update(Applicant domainObject) {
		log.debug("update() method called.");
		try {
			dao.update(domainObject);
		} catch (DaoException ex) {
			ex.printStackTrace();
		}
	}

	public Applicant load(Integer id) {
		log.debug("load() method called.");
		Applicant newDomainObj = null;
		try {
			newDomainObj = dao.load(id);
		} catch (DaoException ex) {
			ex.printStackTrace();
		}
		return newDomainObj;
	}

	public Applicant findByLoginId(String id) {
		log.debug("findByLoginId() method called.");
		Applicant newDomainObj = null;
		try {
			newDomainObj = dao.findByLoginId(id);
		} catch (DaoException ex) {
			ex.printStackTrace();
		}
		return newDomainObj;
	}
	
	private String comments;
	
	public String getComments() {
		return comments;
	}

	public void setComments(String comments) {
		this.comments = comments;
	}

	private String cellPhone;

	public String getCellPhone() {
		return cellPhone;
	}

	public void setCellPhone(String cellPhone) {
		this.cellPhone = cellPhone;
	}

	private String document1;
	public String getDocument1() {
		return document1;
	}

	public void setDocument1(String document1) {
		this.document1 = document1;
	}

	private String document2;
	
	public String getDocument2() {
		return document2;
	}

	public void setDocument2(String document2) {
		this.document2 = document2;
	}

	private String document3;
	
	public String getDocument3() {
		return document3;
	}

	public void setDocument3(String document3) {
		this.document3 = document3;
	}

	private String document4;
	public String getDocument4() {
		return document4;
	}

	public void setDocument4(String document4) {
		this.document4 = document4;
	}

	private String document5;
	
	public String getDocument5() {
		return document5;
	}

	public void setDocument5(String document5) {
		this.document5 = document5;
	}

	private String document6;
	
	public String getDocument6() {
		return document6;
	}

	public void setDocument6(String document6) {
		this.document6 = document6;
	}

	private String status;
	
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	
	@Temporal(TemporalType.DATE)
	private java.util.Date statusDate;
	
	public java.util.Date getStatusDate() {
		return statusDate;
	}

	public void setStatusDate(java.util.Date statusDate) {
		this.statusDate = statusDate;
	}

	private String evaluatorName;
	
	public String getEvaluatorName() {
		return evaluatorName;
	}

	public void setEvaluatorName(String evaluatorName) {
		this.evaluatorName = evaluatorName;
	}

	@Temporal(TemporalType.DATE)
	private java.util.Date lastDocDate;
	
	public java.util.Date getLastDocDate() {
		return lastDocDate;
	}

	public void setLastDocDate(java.util.Date lastDocDate) {
		this.lastDocDate = lastDocDate;
	}
	
	private String address1;
	public String getAddress1() {
		return address1;
	}

	public void setAddress1(String address1) {
		this.address1 = address1;
	}

	private String address2;
	public String getAddress2() {
		return address2;
	}

	public void setAddress2(String address2) {
		this.address2 = address2;
	}
	
	private String city;
	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	private String state;
	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}
	
	private int		zip;
	public int getZip() {
		return zip;
	}

	public void setZip(int zip) {
		this.zip = zip;
	}
	
	private String loginId;
	public void setLoginId(String loginId) {
		this.loginId = loginId;
	}

	public String getLoginId() {
		return loginId;
	}
	
}
